<%--
    Document   : viewmemos
    Created on : Feb 8, 2012, 7:19:46 PM
    Author     : Steven Lawton
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>View Memos</title>
        <link rel="stylesheet" type="text/css" href="css/style.css" />
        <link rel="stylesheet" type="text/css" href="css/menu.css" />
        <link rel="stylesheet" type="text/css" href="themes/table/blue/style.css" />
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/menu.js"></script>
        <script type="text/javascript" src="js/jquery.tablesorter.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#myTable").tablesorter( {sortList: [[0,0], [0,1]]} );
            }
        );
        </script>
    </head>
    <body>
        <div id="main_container">
            <jsp:include page="loginheader.jsp"/>
            <div class="main_content">
                <jsp:include page="${sessionScope.menuChoice}" /> <!-- include home menu -->
                <div class="center_content">
                    <div class="right_content" style="width: 95%">
                        <h2>Maintenance Memos</h2>
                        <table id="rounded-corner">
                            <table id="myTable" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
                                <thead>
                                    <tr style="font-weight: bold">
                                        <th></th>
                                        <th class="rounded-right" align="center">ID</th>
                                        <th class="rounded-left" align="center">DISCREPANCY</th>
                                        <th class="rounded" align="center">REPORTED BY</th>
                                        <th class="rounded" align="center">AIRPLANE</th>
                                        <th class="rounded" align="center">NOTES</th>
                                        <th class="rounded" align="center">STATUS</th>
                                        <th class="rounded" align="center">START DATE</th>
                                        <th class="rounded" align="center">COMPLETION DATE</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <c:forEach var="memo" items="${memos}">
                                        <tr>
                                            <td></td>
                                            <td>${memo.ID}</td>
                                            <td>${memo.discrepancy}</td>
                                            <td>${memo.reporterId}</td>
                                            <td>${memo.airplane.tailNumber}</td>
                                            <td>${memo.notes}</td>
                                            <td>${memo.status}</td>
                                            <td><fmt:formatDate type="date"  pattern="MMM-dd-yyyy" value="${memo.dateMade}" /></td>
                                            <td><fmt:formatDate type="date"  pattern="MMM-dd-yyyy" value="${memo.dateComplete}" /></td>
                                        </tr>
                                    </c:forEach>
                                </tbody>
                            </table>
                        </table>
                        <br></br><br></br>
                    </div><!-- end of right content-->
                </div>   <!--end of center content -->
                <div class="clear"></div>
            </div> <!--end of main content-->
            <div class="footer">
                <div class="left_footer"><a href="http://apycom.com/"></a>Red Team &copy;</div>
                <div class="right_footer"></div>
            </div> <!-- end footer -->
        </div> <!-- end main container -->
    </body>
</html>
